package bj.yanchao.com.githubdemo;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;

import javax.inject.Inject;

import bj.yanchao.com.githubdemo.components.DaggerActivityComponents;

/**
 * ${TODO} What the class does
 *
 * @author： yanchao
 * @date： 6/4/16-4:40 PM
 * ${TAGS}
 */
public class MainActivity extends Activity {
    @Inject
    SharedPreferences.Editor mEditor;
    @Inject
    SharedPreferences mSharedPreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
//        ((MyApplication) getApplication()).mAppComponents.inject(this);
        DaggerActivityComponents.builder().appComponents(((MyApplication) getApplication()).mAppComponents).build()
                .inject(this);
        mEditor.putString("hi", "yanhcoa");
        mEditor.commit();

    }
}
